<template>
    <div class="user-view">
      <NavBar />
      <Status />
    </div>
  </template>
  
  <script setup>
  import NavBar from '../../components/NavBar_staff.vue';
  import Status from '../../components/RoomStatus.vue';
  </script>
  
  <style scoped>
  .user-view {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: calc(100% - 200px);
    margin-left: 200px;
  }

  .status-view {
    padding: 24px;
    min-height: 100vh;
    background-color: #f5f7fa;
  }

  .header {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    position: sticky;
    top: 24px;
    z-index: 10;
  }

  .header h2 {
    margin: 0;
    color: #1a237e;
    font-size: 24px;
    font-weight: 600;
  }

  .content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 0 12px;
  }

  .status-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
  }

  .status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }

  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
  }

  .room-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a237e;
  }

  .status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
  }

  .status.available {
    background-color: #e8f5e9;
    color: #2e7d32;
  }

  .status.occupied {
    background-color: #ffebee;
    color: #c62828;
  }

  .status.maintenance {
    background-color: #fff3e0;
    color: #ef6c00;
  }

  .card-content {
    margin-bottom: 16px;
  }

  .info-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #546e7a;
  }

  .info-item:last-child {
    margin-bottom: 0;
  }

  .info-label {
    width: 100px;
    font-weight: 500;
  }

  .card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
  }

  .el-button {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
  }

  .el-button--primary {
    background: linear-gradient(90deg, #3949ab 0%, #5c6bc0 100%);
    border: none;
  }

  .el-button--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(57, 73, 171, 0.3);
  }

  .el-button--danger {
    background: linear-gradient(90deg, #c62828 0%, #d32f2f 100%);
    border: none;
  }

  .el-button--danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
  }

  @media (max-width: 768px) {
    .status-view {
      padding: 16px;
    }

    .header {
      padding: 16px;
      margin-bottom: 16px;
    }

    .content {
      grid-template-columns: 1fr;
      gap: 16px;
      padding: 0;
    }

    .status-card {
      padding: 16px;
    }
  }
  </style>